#ifndef CNETWORKCONFIG_H
#define CNETWORKCONFIG_H

/************************************************
Computer systems manage their network interfaces via a set of configurations.
Each configuration describes a set of parameters which instruct the system how
a particular network interface is started.

http://doc.qt.nokia.com/qtmobility-1.1.3/bearer-management.html
 ************************************************/

#include <QObject>
#include <qnetworkconfigmanager.h>
#include <qnetworkconfiguration.h>
#include <QList>
#include <QString>

QTM_USE_NAMESPACE

class CNetworkConfig : public QObject
{
    Q_OBJECT

public:
    CNetworkConfig(QObject *parent = 0);
    ~CNetworkConfig();

    QNetworkConfiguration getDefaultNetworkConfig(bool &bIsValid);
    QList<QNetworkConfiguration>* getActiveNetworkConfigs();
    QList<QNetworkConfiguration>* getDiscoveredNetworkConfigs();


private Q_SLOTS:
    void configurationAdded(const QNetworkConfiguration &config);
    void configurationRemoved(const QNetworkConfiguration &config);
    void configurationChanged(const QNetworkConfiguration &config);
    void updateConfigurations();

public:
    bool hasActiveAccessPoint(QNetworkConfiguration *cfg);


private:
    QNetworkConfigurationManager* m_pNetworkConfigManager;
    QList<QNetworkConfiguration> m_ActiveList;
    QList<QNetworkConfiguration> m_DiscoveredList;
    QList<QNetworkConfiguration> m_DefinedList;
    QList<QNetworkConfiguration> m_UndefinedList;
};

#endif // CNETWORKCONFIG_H
